package servlet.hy_manage;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

/**
 * Servlet implementation class Hy_ZhuCeXxServlet
 */
public class Hy_ZhuCeXxServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public Hy_ZhuCeXxServlet() {
        super();
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see Servlet#init(ServletConfig)
	 */
	public void init(ServletConfig config) throws ServletException {
		// TODO Auto-generated method stub
	}

	/**
	 * @see Servlet#destroy()
	 */
	public void destroy() {
		// TODO Auto-generated method stub
	}

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		doPost(request, response);
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		PrintWriter out = response.getWriter();
		request.setCharacterEncoding("utf-8");
		response.setCharacterEncoding("utf-8");
		response.setContentType("text/html");
		
		HttpSession session=request.getSession();
		String hy_user=request.getParameter("hy_user");//用户名	
		String hy_name=request.getParameter("hy_name");//姓名
		
		String hy_zhengjian=request.getParameter("hy_zhengjian");//证件
		String hy_cardid=request.getParameter("hy_cardid");//证件号
		
		String hy_tel=request.getParameter("hy_tel");//联系电话
		String hy_yidong=request.getParameter("hy_yidong");//移动电话
		
		String hy_email=request.getParameter("hy_email");//邮件
		String hy_youbian=request.getParameter("hy_youbian");//邮编
		
		String hy_QQ=request.getParameter("hy_QQ");//QQ账户
		String hy_duser=request.getParameter("hy_duser");//推荐人
		String guojia=request.getParameter("guojia");//国籍
		
		String hy_kaihur=request.getParameter("hy_kaihur");//开户人	
		String hy_kaihuh=request.getParameter("hy_kaihuh");//开户行		
		String hy_kaihuka=request.getParameter("hy_kaihuka");//开户卡号
		
		String hy_dizhi=request.getParameter("hy_dizhi");//地址
		
		
		
		session.setAttribute("hy_user",hy_user);
		session.setAttribute("hy_name",hy_name);
		session.setAttribute("hy_zhengjian",hy_zhengjian);
		session.setAttribute("hy_cardid",hy_cardid);
		session.setAttribute("hy_tel",hy_tel);
		session.setAttribute("hy_yidong",hy_yidong);
		session.setAttribute("hy_email",hy_email);
		session.setAttribute("hy_youbian",hy_youbian);
		session.setAttribute("hy_QQ",hy_QQ);
		session.setAttribute("hy_duser",hy_duser);
		session.setAttribute("guojia",guojia);
		session.setAttribute("hy_kaihur", hy_kaihur);
		session.setAttribute("hy_kaihuh", hy_kaihuh);
		session.setAttribute("hy_kaihuka", hy_kaihuka);
		session.setAttribute("hy_dizhi", hy_dizhi);
		
	//	request.getRequestDispatcher("sl_store/loginDetailedConfirmation.jsp").forward(request, response);
		response.sendRedirect("sl_store/loginDetailedConfirmation.jsp");
//		out.print("<script>");
//		out.print("location.href='sl_store/loginDetailedConfirmation.jsp';");
//		out.print("</script>");
//		out.flush();
//		out.close();
	}

}
